cmake_minimum_required(VERSION 3.15)

project(hellolib)

set(CMAKE_C_STANDARD 11)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

add_library(hello SHARED c-src/hello.c)
target_include_directories(hello PUBLIC include)

add_executable(hello-test c-src/main.c)
target_link_libraries(hello-test hello)
target_link_directories(hello-test PUBLIC lib)
target_include_directories(hello-test PUBLIC include)